from typing import Literal

from django import template

register = template.Library()


# @register.filter
@register.filter(name="ifinlist_dnone")
def ifinlist(list1, list2) -> Literal[" ", "d-none"]:
    list2 = list2.split(",")
    for item in list1:
        if item in list2:
            return " "
    return "d-none"
